<?php
return [
    // 设置目标语言为中文
    'language' => 'zh-CN',
    'defaultRoute' => 'site/index',
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
        ],
        ###### Redis 
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '127.0.0.1',
            'password' => null,
            'port' => 6379,
            'database' => 0,
        ],
        //cache
        'redis_cache' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '127.0.0.1',
            'password' => null,
            'port' => 6379,
            'database' => 1,
        ],
        //session
        'redis_session' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '127.0.0.1',
            'password' => null,
            'port' => 6379,
            'database' => 2,
        ],

        'authManager' => [
            'class' => 'yii\rbac\DbManager',
            'itemTable' => 'admin_auth_item',
            'assignmentTable' => 'admin_auth_assignment',
            'itemChildTable' => 'admin_auth_item_child',
            'ruleTable' => 'admin_auth_rule',
        ],
    ],
];
